Skip to content

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Oct 8, 2024

Fix #2036. As an alternate, manylinux could set the default shell on the musllinux images to bash, which would allow us to respect the default shell if someone provided a customize linux. And it would be more consistent across both sets of images. It's present there, but not default. @mayeut, thoughts?

@sergiud
Copy link

sergiud commented Oct 8, 2024

Thank you for looking into this issue.

As a possibly less intrusive approach I can only suggest explicitly setting the default shell in the Docker image (e.g., by symlinking /bin/sh to /bin/bash). However, I don't know whether this approach is better maintainable than explicitly invoking the desired shell.

@mayeut
Copy link
Member

mayeut commented Oct 15, 2024

Changing the default shell in musllinux might be the correct option to get consistency between images.

That being said, cibuildwheel is already requiring bash to be present. I don't know if we're using specific bash syntax somewhere in the code but images are always started with /bin/bash so respecting the default shell will require other changes in cibuildwheel:

shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"]
subprocess.run(
[
self.engine.name,
"create",
"--env=CIBUILDWHEEL",
"--env=SOURCE_DATE_EPOCH",
f"--name={self.name}",
"--interactive",
*(["--volume=/:/host"] if not self.engine.disable_host_mount else []),
*network_args,
*platform_args,
*self.engine.create_args,
self.image,
*shell_args,
],
check=True,
)

@henryiii henryiii marked this pull request as ready for review October 15, 2024 14:26
@henryiii
Copy link
Contributor Author

Since we already use bash in some places, is this a good idea for now, then?

@mayeut
Copy link
Member

mayeut commented Oct 15, 2024

pypa/manylinux#1693 is still building. Images with the default shell being updated to bash will be available for the next cibuildwheel update workflow run.

Since we already use bash in some places, is this a good idea for now, then?

Once the new images are available, this PR should not be necessary and maybe we ought to move away from hardcoding bash being used instead (i.e. respect the default shell as you proposed). IMHO, this PR can be closed.

@henryiii
Copy link
Contributor Author

Okay, sounds good. Should we change the existing /bin/bash one too?

@henryiii henryiii closed this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent treatment of curly braces in test-command

3 participants